﻿Imports Datos
Public Class PedidoNegocio

    Dim dao As New PedidoDatos

    Sub actualizarAprobacionPedido(cia As String, suc As String, tdoc As String, codPedido As String, estado As String, observaciones As String, mdpCodigo As String)
        dao.actualizarAprobacionPedido(cia, suc, tdoc, codPedido, estado, observaciones, mdpCodigo)
    End Sub

    Function obtenerTiposDocumentos(codDocumento As String, tipo As Integer) As DataSet
        Return dao.obtenerTiposDocumentos(codDocumento, tipo)
    End Function

    Function obtenerCondionesVenta(codCondicion As String, codCliente As String) As DataSet
        Return dao.obtenerCondionesVenta(codCondicion, codCliente)
    End Function

    Function obtenerFormaPago(codCondicion As String, codMoneda As String, codPago As String) As DataSet
        Return dao.obtenerFormaPago(codCondicion, codMoneda, codPago)
    End Function

    Function obtenerMonedas(codMoneda As String) As DataSet
        Return dao.obtenerMonedas(codMoneda)
    End Function

    Function obtenerListaPrecios(codLista As String) As DataSet
        Return dao.obtenerListaPrecios(codLista)
    End Function

    Function obtenerListaBancos(codBanco As String) As DataSet
        Return dao.obtenerListaBancos(codBanco)
    End Function

    Function obtenerListaVendedores(codVendedor As String) As DataSet
        Return dao.obtenerListaVendedores(codVendedor)
    End Function

    Function obtenerListaCobradores(codCobrador As String, codCIA As String) As DataSet
        Return dao.obtenerListaCobradores(codCobrador, codCIA)
    End Function

    Function listarDepartamentos() As DataSet
        Return dao.listarDepartamentos()
    End Function

    Function listarProvinciaXDepartamento(codDepartamento As String) As DataSet
        Return dao.listarProvinciaXDepartamento(codDepartamento)
    End Function

    Function listarDistritosXProvincia(codProvincia As String) As DataSet
        Return dao.listarDistritosXProvincia(codProvincia)
    End Function

    Function listarAlmacen(codAlmacen As String) As DataSet
        Return dao.listarAlmacen(codAlmacen)
    End Function

    Function listarProveedores(codProveedor As String) As DataSet
        Return dao.listarProveedores(codProveedor)
    End Function

    Function obtenerAgenciaXID(codAgencia As String)
        Return dao.obtenerAgenciaXID(codAgencia)
    End Function

    Function obtenerAgencias()
        Return dao.obtenerAgencias()
    End Function

    Function obtenerAgenciaSucursalXCliente(codSucursal As String, codCliente As String) As DataSet
        Return dao.obtenerAgenciaSucursalXCliente(codSucursal, codCliente)
    End Function

    Function listarAgencias(codSucursal As String, descripcion As String, codDept As String, codProv As String, codDis As String, tipo As Integer) As DataSet
        Return dao.listarAgencias(codSucursal, descripcion, codDept, codProv, codDis, tipo)
    End Function

    Function listarDireccionEntrega(clenCodigo As String, codCliente As String) As DataSet
        Return dao.listarDireccionEntrega(clenCodigo, codCliente)
    End Function

    Function obtenerUltimosPedidos(codCliente As String) As DataSet
        Return dao.obtenerUltimosPedidos(codCliente)
    End Function

    Function obtenerDetallePedido(codPedido As String) As DataSet
        Return dao.obtenerDetallePedido(codPedido)
    End Function

    Function obtenerDiarioDistribucion(codTurno As String, fecha As String, codVehiculo As String) As DataSet
        Return dao.obtenerDiarioDistribucion(codTurno, fecha, codVehiculo)
    End Function

    Function obtenerPorcentajePercepcion(artPercepcion As String, artZEmergencia As String, cliRetencion As String,
                                         cliPercepcion As String, distrito As String) As DataSet
        Return dao.obtenerPorcentajePercepcion(artPercepcion, artZEmergencia, cliRetencion, cliPercepcion, distrito)
    End Function

    Function obtenerPedidosXFiltro(codEstado As String, cliente As String, tdoc As String, fechaI As String, fechaF As String, vendedor As String) As DataSet
        Return dao.obtenerPedidosXFiltro(codEstado, cliente, tdoc, fechaI, fechaF, vendedor)
    End Function

    Function listarLineas() As DataSet
        Return dao.listarLineas()
    End Function

    Function listarFamiliasXLinea(codLinea As String) As DataSet
        Return dao.listarFamiliasXLinea(codLinea)
    End Function

    Function listarSubFamiliasXLineaXFamilia(codLinea As String, codFamilia As String) As DataSet
        Return dao.listarSubFamiliasXLineaXFamilia(codLinea, codFamilia)
    End Function

    Function obtenerMotivosDesaprobacion() As DataSet
        Return dao.obtenerMotivosDesaprobacion()
    End Function

End Class
